<template>
  <div class="breadcrumb">
    <div class="flex" v-for="(item,index) in menuList" :key="index">
      <div> <img :src="location" v-if="!index" style="margin-right:6px"></div>
      <div> {{ item }}</div>
      <div v-if="index !== menuList.length-1" style="margin:0 6px">&gt;</div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import location from '../assets/location.png'

interface Props {
  menuList: (number | string)[]
}
defineProps<Props>()
</script>

<style scoped lang='less'>
.breadcrumb{
  padding-top: 6px;
  display: flex;
  align-items: center;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}
.flex {
  display: flex;
  align-items: center;
}
img{
  width: 12px;
  vertical-align: middle;
}
</style>
